package com.zhongli.devplatform.po.common;

import com.baomidou.mybatisplus.annotation.*;
import com.zhongli.devplatform.enums.LevelEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author  WuXiCheng
 * @date  2020/7/23 10:12
 * @version 1.0
 */
@ApiModel
@Data
@TableName(value = "read_grade")
public class ReadGradePO {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="")
    private Integer id;


    /**
     * 年级名称
     */
    @TableField(value = "grade_name")
    @ApiModelProperty(value="年级名称")
    private String gradeName;

    /**
     * 年别
     */
    @TableField(value = "grade_type")
    @ApiModelProperty(value="年别")
    private Integer gradeType;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 册级 上下测
     */
    @TableField(value = "volume_level")
    @ApiModelProperty(value="册级 上下测")
    private LevelEnum volumeLevel;

    /**
     * 创建者id
     */
    @TableField(value = "create_user_id",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建者id")
    private Integer createUserId;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="修改时间")
    private Date updateTime;

    /**
     * 修改人id
     */
    @TableField(value = "update_user_id",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="修改人id")
    private Integer updateUserId;


    public String getGradeName() {
        return gradeName + "/" + volumeLevel.getMessage();
    }
}
